﻿using System.Collections.Generic;

namespace Best.SmartCms.Dto.Response
{
    /// <summary>
    /// 树形结构
    /// </summary>
    public class TreeNodeDto
    {
        /// <summary>
        /// 树节点名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 树节点主键
        /// </summary>
        public string Key { get; set; }
        /// <summary>
        /// 下级节点
        /// </summary>
        public List<TreeNodeDto> Children { get; set; }
        /// <summary>
        /// 是否叶子节点
        /// </summary>
        public bool IsLeaf => Children == null || Children.Count < 1;
    }
}




